package com.chance.cc.crawler.development.command.trigger.domain.du;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.core.downloader.HttpPage;
import com.chance.cc.crawler.development.command.job.domain.du.DUSellCalenderCrawlerSchedulerJob;
import com.chance.cc.crawler.development.command.trigger.CommonCrawlerTestSchedulerTrigger;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;

/**
 * @author lt
 * @version 1.0
 * @date 2021-04-28 16:09:32
 * @email okprog@sina.com
 */
public class DUSellCalenderCrawlerSchedulerTrigger extends CommonCrawlerTestSchedulerTrigger {

    public static void main(String[] args) {

        publishDuSellCalenderScheduleTriggerInfo(DUSellCalenderCrawlerSchedulerJob.crawlerScheduler());

//        publishDuSellCalenderSimpleScheduleTriggerInfo(DUSellCalenderCrawlerSchedulerJob.crawlerScheduler());

    }


    public static void publishDuSellCalenderScheduleTriggerInfo(CrawlerJob crawlerJob){

        HttpPage page = metaServiceCommand_15.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                DUSellCalenderCrawlerSchedulerJob.domainId,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 10 5 * * ?",
                "得物发售日历每天5：10采集一次");
    }

    public static void publishDuSellCalenderSimpleScheduleTriggerInfo(CrawlerJob crawlerJob){

        HttpPage page = metaServiceCommand_15.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                DUSellCalenderCrawlerSchedulerJob.domainId,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "得物发售日历临时采集");
    }
}
